﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HomeBuhApp.Account
{
	public partial class ProfilePage : PageWithProfile
	{
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad(e);
			if (!IsPostBack)
			{
				this.FirstName.Text = Profile.FirstName;
				this.LastName.Text = Profile.LastName;
				this.DateOfBirth.SelectedDate = Profile.DateOfBirth;
			}
		}

		protected void SaveProfileButtonClick(object sender, EventArgs e)
		{
			Profile.FirstName = this.FirstName.Text;
			Profile.LastName = this.LastName.Text;
			Profile.DateOfBirth = this.DateOfBirth.SelectedDate;
		}
	}
}